import request from '@/util/request.js'

const accountApi = 
{
    login:function(username,pwd)
    {
        const data = {
            userName: username,
            password:pwd
        };
        
        return request({
            url: '/api/Account/Login',
            headers:{
                isNeedToken:false
            },
            method: 'post',
            data: data
        });
    },
    getUserInfo:function()
    {
        return request({
            url: '/api/Account/GetUserInfo',
            method: 'get',
            headers:{
                isNeedToken:true
            }
        });
    },
    getUserMenu:function()
    {
        return request({
            url: '/api/Account/GetUserMenu',
            method: 'get',
            headers:{
                isNeedToken:true
            }
        });
    },
}

export default accountApi;
